﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Airborne.ScrumPoker.Module.Tests
{
    [TestClass]
    public class CountdownTimerTestFixture 
    {

        [TestMethod]
        public void StartTest()
        {
            CountdownTimer timer = new CountdownTimer();
            Assert.AreEqual(0, timer.CurrentCount);
            Assert.IsFalse(timer.TimerStarted);

            timer.Start(20);
            Assert.IsTrue(timer.CurrentCount > 0);
            Assert.IsTrue(timer.TimerStarted);
        }

        [TestMethod]
        public void StopTest()
        {
            CountdownTimer timer = new CountdownTimer();
            Assert.AreEqual(0, timer.CurrentCount);
            Assert.IsFalse(timer.TimerStarted);

            timer.Start(20);
            Assert.IsTrue(timer.CurrentCount > 0);
            Assert.IsTrue(timer.TimerStarted);

            timer.Stop();
            Assert.IsFalse(timer.TimerStarted);

        }
    }
}
